←Select platform

IccProfileExtended Constructor(IccHeader,IccTagList,byte[],byte[])

Summary
Initializes a new IccProfileExtended with explicit parameters.
Syntax
C#
C++/CLI
Python
public: 
IccProfileExtended(  
   IccHeader header, 
   IccTagList tagList, 
   array<byte>^ tagData, 
   array<byte>^ data 
) 
__init__(self,header,tagList,tagData,data) # Overloaded constructor 

Parameters

header
IccHeader class that has all the ICC header's data.

tagList
IccTagList class that contains information and data about all the tags in the ICC profile.

tagData
Array that contains all the tags data.

data
Array that contains all the ICC profile's data.

Example

In this example, we will create an ICC header, and then load ICC tags list and ICC tags data from another profile, and create our own profile out of them.

C#
using Leadtools; 
using Leadtools.ColorConversion; 
 
 
public void IccProfileExtendedConstructorExample() 
{ 
   // load an Icc Profile 
   string IccfileName = Path.Combine(LEAD_VARS.ImagesDir, "test_IccProfileExtendedCS.icc"); 
   IccProfileExtended iccProfile = new IccProfileExtended(IccfileName); 
 
   // create the new header 
   IccHeader header = IccHeader.Empty; 
 
   header.CmmID = 0x6170706C;     // any CMM ID 
   header.DeviceClass = IccProfileClassType.DeviceLinkClass; 
   header.ColorSpace = IccColorspaceType.LabData; 
   header.Pcs = IccColorspaceType.LabData; 
   header.ProfileSignature = 0x61637370;   // any profile signature 
   header.Platform = IccPlatformSignatureType.MacintoshSignature; 
   header.Flags = IccProfileFlags.None; 
   header.Manufacturer = 0x46464549;       // any manufacturer 
   header.Model = 0x0;   // any model 
   header.Attributes = IccProfileMediaFlags.ColorMedia; 
   header.RenderingIntent = IccRenderingIntentType.AbsoluteColorimetric; 
   header.Creator = 0x46464549;   // any creator 
 
   // set the system date/time as the date/time of the Icc Profile 
   System.DateTime sysDateTime = System.DateTime.Now; 
   IccDateTime iccDateTime = new IccDateTime((ushort)sysDateTime.Year, 
      (ushort)sysDateTime.Month, 
      (ushort)sysDateTime.Day, 
      (ushort)sysDateTime.Hour, 
      (ushort)sysDateTime.Minute, 
      (ushort)sysDateTime.Second); 
 
   header.DateTime = iccDateTime; 
 
   // copy the tag list 
   int counter, numberOfTags; 
 
   numberOfTags = iccProfile.TagList.Tags.Length; 
   IccTag[] tags = new IccTag[numberOfTags]; 
 
   for (counter = 0; counter < numberOfTags; counter++) 
   { 
      tags[counter] = new IccTag(iccProfile.TagList.Tags[counter].Signature, 
         iccProfile.TagList.Tags[counter].Offset, 
         iccProfile.TagList.Tags[counter].Size); 
   } 
 
   IccTagList tagList = new IccTagList(tags); 
 
   // copy the tag data 
   byte[] tagData = new byte[iccProfile.TagData.Length]; 
   iccProfile.TagData.CopyTo(tagData, 0); 
 
   // create the new ICC profile, the Data array parameter will not be passed, because it will be  
   // updated when calling UpdateDataArray() method. 
   IccProfileExtended newIccProfile = new IccProfileExtended(header, tagList, tagData, null); 
 
   // generate the profileId. For the time being, it will be filled with 0's 
   newIccProfile.GenerateProfileId(); 
 
   // finally generate the new Icc Profile by updating the Data Array 
   // and then generating the file 
   newIccProfile.UpdateDataArray(); 
   string IccExtfile = Path.Combine(LEAD_VARS.ImagesDir, "IccProfileExtendedConstructorCS.icc"); 
   newIccProfile.GenerateIccFile(IccExtfile); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ColorConversion Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.